#pragma once
#include "Fysics/Dependencies.h"
#include "Fysics/Application/ApplicationLoader.h"

namespace Fysics
{
	class BasicApplicationRegister
	{
	protected:
		std::map<std::string, ApplicationLoader*> m_Apploaders;
	public:
		virtual void RegisterApplications() = 0;
		Application* OpenApplication(const std::string& appname);
	};
}

#define REGISTER_APPLICATION(Application, appname, icon) \
Fysics::ApplicationLoader* Application##Loader = new Fysics::ApplicationLoader(appname, icon); \
Application##Loader->CreateApplication = []() { return new Application; }; \
m_Apploaders[appname] = Application##Loader;